package com.empire.module.sporttery.dal.mysql.footballmatchodd;

import java.util.*;

import com.empire.framework.common.pojo.PageResult;
import com.empire.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.empire.framework.mybatis.core.mapper.BaseMapperX;
import com.empire.module.sporttery.dal.dataobject.footballmatchodd.FootballMatchOddDO;
import org.apache.ibatis.annotations.Mapper;
import com.empire.module.sporttery.controller.admin.footballmatchodd.vo.*;

/**
 * 竞猜足球指数 Mapper
 *
 * @author 无敌仙人
 */
@Mapper
public interface FootballMatchOddMapper extends BaseMapperX<FootballMatchOddDO> {

    default PageResult<FootballMatchOddDO> selectPage(FootballMatchOddPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<FootballMatchOddDO>()
                .eqIfPresent(FootballMatchOddDO::getMatchId, reqVO.getMatchId())
                .eqIfPresent(FootballMatchOddDO::getHomeTeam, reqVO.getHomeTeam())
                .eqIfPresent(FootballMatchOddDO::getAwayTeam, reqVO.getAwayTeam())
                .eqIfPresent(FootballMatchOddDO::getHomePreRank, reqVO.getHomePreRank())
                .eqIfPresent(FootballMatchOddDO::getAwayPreRank, reqVO.getAwayPreRank())
                .eqIfPresent(FootballMatchOddDO::getHomeCurRank, reqVO.getHomeCurRank())
                .eqIfPresent(FootballMatchOddDO::getAwayCurRank, reqVO.getAwayCurRank())
                .betweenIfPresent(FootballMatchOddDO::getMatchTime, reqVO.getMatchTime())
                .eqIfPresent(FootballMatchOddDO::getScore, reqVO.getScore())
                .eqIfPresent(FootballMatchOddDO::getMatchResult, reqVO.getMatchResult())
                .likeIfPresent(FootballMatchOddDO::getMatchName, reqVO.getMatchName())
                .eqIfPresent(FootballMatchOddDO::getLeagueId, reqVO.getLeagueId())
                .eqIfPresent(FootballMatchOddDO::getCurrentCycle, reqVO.getCurrentCycle())
                .betweenIfPresent(FootballMatchOddDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(FootballMatchOddDO::getId));
    }

}